//
//  PKRootLeftViewHeaderView.m
//  PianKe
//
//  Created by lanou on 15/10/6.
//  Copyright (c) 2015年 李伟伟. All rights reserved.
//

#import "PKRootLeftViewHeaderView.h"

@implementation PKRootLeftViewHeaderView
//布局左边根视图的表头试图
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _photoView = [[UIImageView alloc]initWithFrame:CGRectMake(20, 30, 50, 50)];
        _photoView.layer.cornerRadius = 25;
        _photoView.backgroundColor = [UIColor whiteColor];
        
        _nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(72, 45, 100, 20)];
        _nameLabel.text = @"伟伟哥哥";
        
        _myDownloadButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _myDownloadButton.frame = CGRectMake(20, 120, 30, 30);
        [_myDownloadButton setBackgroundImage:[[UIImage imageNamed:@"下载"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal ] forState:UIControlStateNormal];
        
        
        _myLikeButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _myLikeButton.frame = CGRectMake(100, 120, 30, 30);
        [_myLikeButton setBackgroundImage:[[UIImage imageNamed:@"心"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal ] forState:UIControlStateNormal];
        
        _myMessageButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _myMessageButton.frame = CGRectMake(180, 120, 30, 30);
        [_myMessageButton setBackgroundImage:[[UIImage imageNamed:@"消息"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal ]forState:UIControlStateNormal];
        
        _myWriteButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _myWriteButton.frame = CGRectMake(260, 120, 30, 30);
        [_myWriteButton setBackgroundImage:[[UIImage imageNamed:@"笔"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal ]forState:UIControlStateNormal];
        
 

        
        
        [self addSubview:_photoView];
        [self addSubview:_nameLabel];
        [self addSubview:_myDownloadButton];
        [self addSubview:_myLikeButton];
        [self addSubview:_myMessageButton];
        [self addSubview:_myWriteButton];
       
        
    }
    return self;
}





@end
